
<template>
    <el-tree :data="categoryDTOList" :props="defaultProps" ></el-tree>
</template>

<script>

import * as categoryApi from '../../api/gmall/product/category'
export default {
    data(){
        return{
            categoryDTOList:[],
            defaultProps: {
                children: 'children',
                label: 'name'
            }
        }
    },
    methods:{
        findBaseCatgoryDTOTree(){
            categoryApi.findBaseCatgoryDTOTree().then(res=>{
                if(res.data.ok){
                    console.log(res.data.data)
                    this.categoryDTOList = res.data.data;
                }
            })
        }
    },
    mounted(){
        this.findBaseCatgoryDTOTree();
    }
}
</script>

<style>

</style>

